package cn.felord.springboot.configuration;

import cn.felord.springboot.filters.RequestFilter;
import cn.felord.springboot.filters.ResponseFilter;
import org.springframework.boot.web.servlet.filter.OrderedFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 完全自定义的写法 测试放开 {@link Configuration} 注解
 *
 * @author Felordcn
 * @since 10:39
 **/
@Configuration
public class FilterConfig {


    @Bean
    public OrderedFilter responseFilter() {
        return new ResponseFilter("/foo/*");
    }

    @Bean
    public OrderedFilter requestFilter() {
        return new RequestFilter("/foo/*");

    }


}
